<!DOCTYPE HTML>
<html>
    <head>
        <meta charset="utf-8" /> <title>SimpleUI 示例中心</title>
		<meta name="description" content="SimpleUI是一个基于jQuery的组件库，适合用于构建web2.0的应用程序和小型网站" />
		<meta name="keywords" content="jQuery js simple ui simpleUI web application" />
        <link type="text/css" rel="stylesheet" href="SyntaxHighlighter/SyntaxHighlighter.css"/>
        <link type="text/css" rel="stylesheet" href="css/core.css"/>
        <link type="text/css" rel="stylesheet" href="../src/_beta/SimpleTip/tip.css"/>
    </head>
    <body>
        <div class="container clearfix" id="hd">
            <h1 class="s-logo"></h1>
            <div class="s-nav">
                <span class="s-nav-l"></span>
                <span class="s-nav-r"></span>
                <ul class="clearfix">
                    <li class="current">
                        <a href="doc.html">文档</a>
                    </li>
                    <li>
                        <a href="demo.html">示例</a>
                    </li>
                    <li>
                        <a href="http://code.google.com/p/simple-ui/downloads/list">下载</a>
                    </li>
                    <li>
                        <a href="deploy.html">部署</a>
                    </li>
					<li>
                        <a href="http://www.iqianduan.org/t-191-1-1.html" target="_blank">论坛</a>
                    </li>
                    <li>
                        <a href="#">关于</a>
                    </li>
                </ul>
            </div>
        </div>
        <div class="container" id="bd">
            <h2 class="s-title">SimpleUI 部署</h2>
            <div class="clearfix doc-content">
            	<p>
            		SimpleUI是个分散的组件库，您可以选择您需要的功能进行打包。下面提供几种资源打包方式~
					为什么要部署就不再这里多说了，直接介绍方法了
				</p>
				<h3 class="api-guide">使用Ant打包压缩静态资源</h3>
				工具:  <a href="http://ant.apache.org/" target="_blank">Apache Ant</a>,<a href="http://yuilibrary.com/projects/yuicompressor/" target="_blank">YUI Compresser</a>
<p>
	Ant是个强大的基于JAVA的构建工具，YUI compresser也是基于JAVA的JS和CSS压缩工具，所以运行前都必须安装JDK
</p>
				<textarea name="code" class="xml">
<?xml version="1.0" encoding="UTF-8"?>
<project name="deploy SimpleUI" default="compress">
	<description>压缩SimpleUI</description>
	<property name="src" location="_beta/src"/>
	<property name="build" location="build"/>
	<property name="charset" value="utf-8"/>
    <target name="init">
    	<mkdir dir="${build}" />
    </target>
	<target name="concat" depends="init">
		<concat destfile="${build}/simpleui.js" encoding="${charset}" outputencoding="${charset}">
			<fileset dir="${src}">  
                <include name="*.js"/>  
            </fileset>  
		</concat>
	</target>
	<target name="compress" depends="concat">
		<echo message="start compress" />
		<java jar="yuicompressor-2.4.6.jar" fork="true" failonerror="false">
			<arg line="--type js --charset ${charset} --nomunge ${build}/simpleui.js -o ${build}/simpleui-min.js" />
		</java>
		<echo message="end compress" />
	</target>
</project></textarea>
如果配置了ant环境变量，使用cmd进入到需要放置build.xml的文件夹，输入ant命令即可完成压缩和合并
<textarea name="code" class="js">
	ant
</textarea>
	
				<h3 class="api-guide">使用minify动态打包压缩资源</h3>
工具：<a href="http://code.google.com/p/minify/" target="_blank">minify</a>
<p>minify是基于PHP的JS和CSS合并压缩扩展，如果你的服务器部署了minify服务。那么访问下面的地址即可得到压缩合并的JS或者CSS文件,
不过还是推荐静态资源合并，这样可以缓解服务器的压力...</p>
                <textarea name="code" class="html">
<script type="text/javascript" src="http://domain.com/min/?f=js/jquery_min.js,js/SimpleCore.js,js/SimpleDialog.js,js/SimpleAutoComplete.js"></script>
                </textarea>
            </div>
        </div>
        <script src="SyntaxHighlighter/shCore.js"></script>
        <script src="SyntaxHighlighter/allmin.js"></script>
        <script type="text/javascript">
        window.onload = function () {
            dp.SyntaxHighlighter.ClipboardSwf = 'SyntaxHighlighter/clipboard.swf';
            dp.SyntaxHighlighter.HighlightAll('code');
        } 
        </script>
        <script type="text/javascript" src="../src/jquery.js"></script>
        <script type="text/javascript" src="../src/_beta/SimpleCore.js"></script>
        <script type="text/javascript" src="../src/_beta/SimpleTip/SimpleTip.js"></script>
        <script type="text/javascript">
        (function(){
            var ajaxHtmlStore={},
             getHtml=function(url){
                var temp;
                if(ajaxHtmlStore[url]){
                    $(".api-content").html(ajaxHtmlStore[url]);
                    dp.SyntaxHighlighter.ClipboardSwf = 'SyntaxHighlighter/clipboard.swf';
                    dp.SyntaxHighlighter.HighlightAll('code');
                }else{
                    var load=$.loadTip("正在加载API...")
                    $.get(url,function(res){
                        ajaxHtmlStore[url]=res;
                        $(".api-content").html(ajaxHtmlStore[url]);
                        dp.SyntaxHighlighter.ClipboardSwf = 'SyntaxHighlighter/clipboard.swf';
                        dp.SyntaxHighlighter.HighlightAll('code');
                        load.hide();
                    });
                }
            }
            $(".s-list a,.ajax-load").live("click",function(){
                var url=$(this).attr("href"),beta=$(this).attr("data-info");
                if(beta){
                    $.alertTip("即将推出,敬请关注...",3000)
                    return false;
                }
                getHtml(url);
                return false;
            })
        })();
        </script>
		<span style="display:none"><script src="http://s24.cnzz.com/stat.php?id=3606083&web_id=3606083"></script></span>
    </body>
</html>
